const { EasyisOpenApi } = require('easyisapi-sdk')
const api = EasyisOpenApi.getInstance()

//const tableCode = 'st_ide_page_js'
const tableCode = 'st_ide_person_test'

exports.insert = function(formData) {
    const data = {
        tableCode,
        formData
    }
    const result = api.dataService.insert(data);
    return result;
}


exports.update = function(formData) {
    const data = {
        tableCode,
        formData
    }
    const result = api.dataService.update(data);
    return result;
}

exports.deleteByIds = function(ids) {
    const data = {
        tableCode,
        ids
    }
    const result = api.dataService.deleteByIds(data);
    return result;
}

exports.select = function(param) {
    const data = Object.assign({
        tableCode
    },param)

    const result = api.dataService.select(data);
    return result;
}
exports.selectById = function(id) {
    const data = {
        tableCode,
        id
    }

    const result = api.dataService.selectById(data);
    return result;
}

exports.diff = function(n1,n2) {
    return n1-n2
}